com.supermap.mapping.dyn

Class DynamicElement

  • java.lang.Object
    • com.supermap.mapping.dyn.DynamicElement
    • Method Detail

      • setStyle

        public void setStyle(DynamicStyle style)
        Sets the style.
        Parameters:
        style - The style.
      • setUserData

        public void setUserData(java.lang.Object data)
        Sets the user data.
        Parameters:
        data - The user data.
      • getUserData

        public java.lang.Object getUserData()
        Gets the user data.
        Returns:
        The user data.
      • getStyle

        public DynamicStyle getStyle()
        Gets the style.
        Returns:
        The style of the dynamic object.
      • getGeoPoints

        public Point2Ds getGeoPoints()
        Gets the tuples.
        Returns:
        The point string of dynamic object.
      • getPart

        public java.util.ArrayList<java.lang.Integer> getPart()
        Gets the point string group info.
        Returns:
        The point string group info.
      • getID

        public int getID()
        Gets the ID of dynamic object.
        Returns:
        The ID of dynamic object.
      • getBounds

        public Rectangle2D getBounds()
        Gets the range of dynamic object.
        Returns:
        The border extent.
      • setOnClickListenner

        public void setOnClickListenner(DynamicElement.OnClickListener listener)
        Sets the clicking listener.
        Parameters:
        listener - Click listener.
      • addPoint

        public void addPoint(Point2D pt)
        Adds the point.
        Parameters:
        pt - Added points.
      • updatePoint

        public void updatePoint(int index,
                                Point2D pt)
        Updates the point.
        Parameters:
        index - Index
        pt - New Point coordinates
      • addAnimator

        public void addAnimator(Animator animator)
        Adds the animation to the dynamic element. It can add mutiple animation.
        Parameters:
        animator - Dynamic element Animation
      • fromGeometry

        public abstract boolean fromGeometry(Geometry geometry)
        Create the dynamic data through Geometry.
        Parameters:
        geometry - Geographic elements
        Returns:
        A boolean, Returns true if the constructor successful; Otherwise false.
      • setMinShowScale

        public void setMinShowScale(double scale)
        Sets the minimum display scale.
        Parameters:
        scale - Sets the minimum display scale.
      • getMinShowScale

        public double getMinShowScale()
        Gets the minimum display scale.
        Returns:
        The minimum display scale.
      • setOnLongPressListener

        public void setOnLongPressListener(DynamicElement.OnLongPressListener listener)
        Sets the long-click listener.
        Parameters:
        listener - long-click listener.
      • getOnLongPressListener

        public DynamicElement.OnLongPressListener getOnLongPressListener()
        Gets the long-click listening of this object
        Returns:
        The long-click listener.
      • setTag

        public void setTag(java.lang.String tag)
        Sets the label.
        Parameters:
        tag - Label.
      • getTag

        public java.lang.String getTag()
        Gets the label. Default value is null
        Returns:
        Label.
      • setName

        public void setName(java.lang.String name)
        Sets the name of a dynamic object.
        Parameters:
        name - Name
      • getName

        public java.lang.String getName()
        Gets the name of the dynamic object, and the default problem null.
        Returns:
        Name
      • setNameVisible

        public void setNameVisible(boolean visible)
        Sets whether the dynamic object name is visible, and is not visible by default.
        Parameters:
        visible - Whether it is visible.
      • isNameVisible

        public boolean isNameVisible()
        Gets whether the dynamic object name is visible, and the default false.
        Returns:
        Whether it is visible.
      • setNameColor

        public void setNameColor(int color)
        Sets name font color, default black
        Parameters:
        color - The color value.
      • setNameSize

        public void setNameSize(float size)
        Sets name font size default 16pixel.
        Parameters:
        size - The size text.
      • getNameColor

        public int getNameColor()
        Gets the name font color.
        Returns:
        The color value.
      • getNameSize

        public float getNameSize()
        Gets the name font size.
        Returns:
        The name font size.
      • setNameTextAlign

        public void setNameTextAlign(DynamicAlignment align)
        Sets the name text to its method, the default center alignment.
        Parameters:
        align - Alignment
      • getNameTextAlign

        public DynamicAlignment getNameTextAlign()
        Gets the name text to its method, the default center alignment.
        Returns:
        Alignment
      • setNamePosition

        public void setNamePosition(Point2D position)
        Sets the location of the name text.
        Parameters:
        position - Position coordinates, using map coordinates.
      • getNamePosition

        public Point2D getNamePosition()
        Gets the location coordinates of the name text, and if the user does not have the setting, the object center point is adopted by default.
        Returns:
        Returns the position coordinate point Point2D, using the map coordinates.
      • dispose

        public void dispose()
        Disposes resources.
      • setNameOffsetX

        public void setNameOffsetX(float offsetX)
        Sets the X offset of the name text.
        Parameters:
        offsetX - Position offset
      • getNameOffsetX

        public float getNameOffsetX()
        Parameters:
        offsetX - Gets the X offset of the name text.
        Returns:
        The X offset.
      • setNameOffsetY

        public void setNameOffsetY(float offsetY)
        Sets the Y offset of the name text.
        Parameters:
        offsetY - Position offset
      • getNameOffsetY

        public float getNameOffsetY()
        Gets the Y offset of the name text.
        Returns:
        The Y offset.
      • getOnDownAndUpListener

        public DynamicElement.OnDownAndUpListener getOnDownAndUpListener()
        Gets the listener OnDownAndUpListener of the object
        Returns:
        OnDownAndUpListener the listener
      • setOnDownAndUpListener

        public void setOnDownAndUpListener(DynamicElement.OnDownAndUpListener listener)
        Sets the listeners as fingers press down or leave dynamic objects.
        Parameters:
        listener - the listener for pressing down or leaving dynamic objects.
      • addPoints

        public void addPoints(Point2Ds ps)
        Add point set
        Parameters:
        pt -